package com.fwtai.web;

import com.fwtai.bean.PageFormData;
import com.fwtai.datasource.DaoHandle;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 欢迎页统计访问数据库
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2021-07-21 17:49:27
 * @QQ号码 444141300
 * @Email service@yinlz.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@Repository
public class WelcomeDao{

    @Resource
    private DaoHandle dao;

    public List<Map<String, Object>> getAllUser(){
        return dao.queryForListMap("welcome.getAllUser");
    }

    public List<Map<String, Object>> getShareTotal(final String loginId){
        return dao.queryForListMap("welcome.getShareTotal",loginId);
    }

    public List<Map<String, Object>> getRegisterMonth(){
        return dao.queryForListMap("welcome.getRegisterMonth");
    }

    public List<Map<String, Object>> getBrowseDay(final String day){
        return dao.queryForListMap("welcome.getBrowseDay",day);
    }

    public List<Map<String, Object>> getBrowseMonth(){
        return dao.queryForListMap("welcome.getBrowseMonth");
    }

    public List<Map<String, Object>> getShareInfoList(final PageFormData formData){
      return dao.queryForListMap("welcome.getShareInfoList",formData);
    }

    public Integer getShareInfoTotal(final PageFormData formData){
        return dao.queryForInteger("welcome.getShareInfoTotal",formData);
    }

    public HashMap<String,Object> getDataOverview(){
      return dao.queryForHashMap("welcome.getDataOverview");
    }
}